﻿Namespace Classes
    'Déclaration de la structure des critères
    Public Class eCritere
        Public Classe As String

        Public NivDe As Short
        Public NivA As Short

        Public TypePouvoir As String
        Public Race As String

        Public PouvoirTalent As Boolean
        Public AptitudeClasse As Boolean
        Public TraitsRaciaux As Boolean
        Public Aptitudes As Boolean

        Public Sub New()

        End Sub

        Public Overrides Function ToString() As String
            Dim sChaine As String = ""
            'Classe
            If Me.Classe <> "" Then
                sChaine = sChaine & "    Classe = " & Me.Classe & System.Environment.NewLine
            End If
            'Niv De
            If Me.NivDe <> -1 Then
                'Niv A
                If Me.NivA <> -1 Then
                    sChaine = sChaine & "    Niveau de " & Me.NivDe & " à " & Me.NivA & System.Environment.NewLine
                Else
                    sChaine = sChaine & "    Niveau = " & Me.NivDe & System.Environment.NewLine
                End If
            End If
            'Type Pouvoir
            If Me.TypePouvoir <> "" Then
                sChaine = sChaine & "    Type Pouvoir = " & Me.TypePouvoir & System.Environment.NewLine
            End If
            'Race
            If Me.Race <> "" Then
                sChaine = sChaine & "    Race = " & Me.Race & System.Environment.NewLine
            End If
            'Pouvoir de talent
            If Me.PouvoirTalent = True Then
                sChaine = sChaine & "    Pouvoir de talent = OUI" & System.Environment.NewLine
            End If
            'Pouvoir d'Aptitude de Classe
            If Me.AptitudeClasse = True Then
                sChaine = sChaine & "    Pouvoir d'Aptitude de classe = OUI" & System.Environment.NewLine
            End If
            'Traits Raciaux
            If Me.TraitsRaciaux = True Then
                sChaine = sChaine & "    Traits Raciaux = OUI" & System.Environment.NewLine
            End If
            'Aptitudes
            If Me.Aptitudes = True Then
                sChaine = sChaine & "    Aptitudes de Classe = OUI" & System.Environment.NewLine
            End If
            Return sChaine
        End Function
    End Class
End Namespace